Subscribe Us

Responsive Advertisement

Advertisement

1633A Div. 7 codeforces solution in cpp

 

1633A Div. 7 codeforces solution in cpp

by ujjal roy


#include<bits/stdc++.h>

using namespace std;


main()

{

    int t,n,i;

    cin>>t;

    while(t--)

    {

        cin>>n;

        if(n%7==0) cout<<n<<endl;

        else

        {

            n/=10;

            n*=10;

            while(n%7) n++;

            cout<<n<<endl;


        }



    }



    return 0;

}


Post a Comment

0 Comments